package com.pig4cloud.pig.village.rules.generator;

import com.pig4cloud.pig.village.rules.RuleConditionType;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class RuleConditionTypeMapping {
	private static final Map<String, List<RuleConditionType>> map = new HashMap<>();

	static {
		map.put("age",
				new ArrayList<RuleConditionType>() {{
					add(RuleConditionType.NUMERIC_RANGE);
				}});
		map.put("registerType",
				new ArrayList<RuleConditionType>() {{
					add(RuleConditionType.NUMERIC_SINGLE);
				}});
		map.put("livingType",
				new ArrayList<RuleConditionType>() {{
					add(RuleConditionType.NUMERIC_SINGLE);
				}});
		map.put("abandonPoultry",
				new ArrayList<RuleConditionType>() {{
					add(RuleConditionType.NUMERIC_SINGLE);
				}});
		map.put("retiredCaptain",
				new ArrayList<RuleConditionType>() {{
					add(RuleConditionType.NUMERIC_SINGLE);
				}});
		map.put("retiredPrincipal",
				new ArrayList<RuleConditionType>() {{
					add(RuleConditionType.NUMERIC_SINGLE);
				}});
		map.put("partyMember",
				new ArrayList<RuleConditionType>() {{
					add(RuleConditionType.NUMERIC_SINGLE);
				}});
		map.put("hardGroup",
				new ArrayList<RuleConditionType>() {{
					add(RuleConditionType.NUMERIC_SINGLE);
				}});
		map.put("school",
				new ArrayList<RuleConditionType>() {{
					add(RuleConditionType.NUMERIC_SINGLE);
					add(RuleConditionType.ARRAY);
				}});
		map.put("violationType",
				new ArrayList<RuleConditionType>() {{
					add(RuleConditionType.STRING);
				}});
	}

	public static Map<String, List<RuleConditionType>> getValue() {
		return map;
	}
}
